<?php

use yii\helpers\Inflector;
use yii\helpers\StringHelper;

/*
 * @var yii\web\View $this
 * @var yii\gii\generators\crud\Generator $generator
 */

/** @var \yii\db\ActiveRecord $model */
$model = new $generator->modelClass();
$model->setScenario('crud');
$modelName = Inflector::camel2words(StringHelper::basename($model::className()));


echo "<?php\n";
?>

use yii\helpers\Html;

/**
* @var yii\web\View $this
* @var <?= ltrim($generator->modelClass, '\\') ?> $model
*/

$this->title = Yii::t('<?= $generator->modelMessageCategory ?>', '<?= $modelName ?>');
$this->params['breadcrumbs'][] = ['label' => Yii::t('<?= $generator->modelMessageCategory ?>', '<?=Inflector::pluralize($modelName) ?>'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="box box-info giiant-crud <?= Inflector::camel2id(StringHelper::basename($generator->modelClass), '-', true) ?>-create">

    <div class="box-header with-border">
        <div class="box-title">
            <?= '<?= $this->title ?>' ?>
        </div>
    </div>

    <div class="box-body">
        <div class="clearfix crud-navigation">
            <div class="pull-left">
                <?= '<?= ' ?>
                Html::a(
                <?= $generator->generateString('取消') ?>,
                \yii\helpers\Url::previous(),
                ['class' => 'btn btn-default']) ?>
            </div>
        </div>

        <hr />

        <?= '<?= ' ?>$this->render('_form', [
        'model' => $model,
        ]); ?>
    </div>
</div>
